package cn.edu.zhku.service.impl;

import cn.edu.zhku.dto.FormDto;
import cn.edu.zhku.pojo.form.Form;
import cn.edu.zhku.service.AbstractState;
import org.springframework.stereotype.Component;

// 重做
@Component("redoState")
public class RedoState extends AbstractState {

    private static final Integer state = 3;

    @Override
    public void doAction(FormDto formDto) {
        Form form = formDto.getForm();
        form.setState(state);
        this.formService.modifyOneSimple(form);
    }

}
